these instruction are output instruction and perfom aritmatic operation such as addition, subtruction, multiplication, divison etc.
The majority of the instructions take two input values, perform the specified arithmetic function, store the result at specified or assigned address. result of the operation exceeds the allowable value, an overflow or underflow bit is set this os called Arithmetic Status Bits.
The arithmetic status bits are in word 0 bits 0-3 in the processor status file.
S:0/0 : Carry (C)
S:0/1 : Overflow (O)
S:0/2 : Zero (Z)
S:0/3 : Sign (S)
parameter:
Source is the address of the values. This can be word addresses or constants values. for example N7:0, 12 etc.
Destination is the address of the result same data type as source.
data type same source as well as destination.
ADD , Addition Instructions
When rung conditions are true, this output instruction add Source A and Source B values and stores the result of addition into the destination address. Source A and Source B can either be constant values or address.
if input I:0/3 is set 1 value of source A N7:0 and Source B N7:1 are added and result is stored in Dest N7:2.
SUB, Subtract instruction
When rung conditions are true,SUB instruction subtract value of source B from another value of source
A and place the result in the dest address. Source A and Source B can either be values or addresses that contain values.
if input I:0/3 is set 1 value of source A N7:0 and Source B N7:1 are added and result is stored in Dest N7:2.
MUL, Multiplication instruction
When rung conditions are true,multiply MUL instruction multiply value of source B from another value of source
A and place the result in the dest address. Source A and Source B can either be values or addresses that contain values.
if input I:0/8 is set 1 value of source A N7:0 and Source B N7:1 are multiply and result is stored in Dest N7:4.
DIV, Divide instruction
When rung conditions are true,Divide DIV instruction Divide value of source B from another value of source
A and place the result in the dest address. Source A and Source B can either be values or addresses that contain values.
if input I:0/7 is set 1 value of source A N7:0 and Source B N7:1 are Divide and result is stored in Dest N7:4.
SQRT, Square Root instruction
When rung conditions are true, this output instruction calculates the square root of the absolute value of the source and places the rounded result in the destination.
if input I:0/6 is set 1, this instruction calculate Square Root of source and place in the destination N7:6.
NEG, Negate instrucntion
When rung conditions are true, this instrucntion change the sign of source value and store in destination address. for example if source value is 122 than destination store -127.
if input I:0/5 is set 1, this instruction change the sign of source value and place in destination.